home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / nihcl-30.lha / nihcl-3.0 / vector / Makefile < prev    next >
Makefile  |  1990-05-20  |  2KB  |  102 lines

  1. # $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/vector/RCS/Makefile,v 3.0 90/05/20 21:04:12 kgorlen Rel $
  2. # C++ compiler
  3. CC = CC
  4.  
  5. # C++ debug switch
  6. CCDEBUG =
  7. #CCDEBUG = -g
  8.  
  9. # C++ flags
  10. # NOTE: Disable +p option when compiling with AT&T R2.1
  11. CCFLAGS = +p
  12. #CCFLAGS =
  13.  
  14. # C++ include files
  15. I = /usr/include/CC
  16.  
  17. # If using BSD
  18. SYS = BSD
  19. # If using System V
  20. #SYS = SYSV
  21.  
  22. # Compile with nested types (works with AT&T R2.1 and GNU C++)
  23. NESTED_TYPES =
  24. #NESTED_TYPES = -DNESTED_TYPES
  25.  
  26. # Disable AT&T R2.0/R2.1 bug work-around code
  27. BUGDEFS =
  28. #BUGDEFS = -DBUG_bC2728 -DBUG_38 -DBUG_39 -DBUG_OPTYPECONST
  29. # Defining BUG_TOOBIG disables code that prevents C compiler "yacc stack overflows"
  30. #BUGDEFS = -DBUG_bC2728 -DBUG_38 -DBUG_39 -DBUG_OPTYPECONST -DBUG_TOOBIG
  31.  
  32. # Enable debug code
  33. DEBUGDEFS =
  34. #DEBUGDEFS = -DDEBUG_OBJIO -DDEBUG_PROCESS
  35.  
  36. # For no multiple inheritance support
  37. MI =
  38. # Enable support for multiple inheritance
  39. #MI = -DMI
  40.  
  41. NIHCLLIB = ../lib/libnihcl.a
  42. NIHVECLIB = libnihclvec.a
  43.  
  44. CFLAGS = -I${NIHCLINCDIR} ${MI} ${CCDEBUG} ${CCFLAGS} ${NESTED_TYPES} ${BUGDEFS} ${DEBUGDEFS}
  45.  
  46. # Target Directories
  47. NIHCLLIBDIR = /usr/lib
  48. NIHCLINCDIR = ../lib
  49.  
  50. include make.all
  51.  
  52. .SUFFIXES: ..c .s
  53. .c.a:
  54.     echo $< >>targetlist
  55. .c.o:
  56.     ${CC} ${CFLAGS} -c $<
  57. .c..c:
  58.     ${CC} ${CFLAGS} +i -c $<
  59. .c.s:
  60.     ${CC} ${CFLAGS} +i -S $<
  61.  
  62. .PRECIOUS: ${NIHVECLIB}
  63.  
  64. all: always ${NIHVECLIB}
  65.  
  66. ${NIHVECLIB}: ${OBJECTS}
  67.     ${CC} ${CFLAGS} -c `cat targetlist`
  68.     ar rv $@ *.o
  69.     rm -f *.o
  70.     if test ${SYS} = BSD ; then ranlib ${NIHVECLIB}; fi
  71.  
  72. always:
  73.     -rm -f targetlist *.o
  74.     ${MAKE} generic
  75.  
  76. generic:
  77.     ${MAKE} -f genericmake ${VECS}
  78.  
  79. install:
  80.     cp lib*.a ${NIHCLLIBDIR}
  81.     if test ${SYS} = BSD ; then \
  82.         for i in lib*.a; do (cd ${NIHCLLIBDIR}; ranlib -t $$i); done; \
  83.     fi
  84.     -mkdir ${NIHCLINCDIR}
  85.     cp *.h ${NIHCLINCDIR}
  86.  
  87. depend:
  88.     -rm -f *..c
  89.     echo 'VECS =' *Vec.h | sed -e 's#\([a-zA-Z0-9_]*\)\.h#\1.c#g' >make.all
  90.     ${MAKE} generic
  91.     echo 'OBJECTS =' *.c | sed -e 's#\([a-zA-Z0-9_]*\)\.c#${NIHVECLIB}(\1.o)#g' >>make.all
  92.     touch make.tdep
  93.     makedepend -I$I -I${NIHCLINCDIR} -f make.tdep -- ${CFLAGS} -- *.c
  94.     sed -e 's#${NIHCLINCDIR}/#$${NIHCLINCDIR}/#g' make.tdep | sed -e 's# $I/[^     $$]*##g' | sed -e 's# /usr/include/[^  $$]*##g' | sed -e '/:[  ]*$$/d' | tee MAKE.dep | sed -e 's#\([a-zA-Z0-9_]*\.o\)#${NIHVECLIB}(\1)#g' >make.dep
  95.     rm make.tdep
  96.  
  97. clean:
  98.     -chmod u+w *Vec.c
  99.     -rm -f targetlist *.o *Vec.c *..c *.s *.a make.tdep
  100.  
  101. include make.dep
  102.